home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / ping.z / ping
Encoding:
Text File  |  2001-04-17  |  14.7 KB  |  331 lines

  1.  
  2.  
  3.  
  4. PPPPIIIINNNNGGGG((((1111MMMM))))                                                              PPPPIIIINNNNGGGG((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ping - send ICMP ECHO_REQUEST packets to network hosts
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////eeeettttcccc////ppppiiiinnnngggg [----ddddDDDDffffLLLLnnnnooooPPPPqqqqQQQQrrrrRRRRvvvv] [----cccc _c_o_u_n_t] [----ssss _s_i_z_e]
  13.           [----iiii _i_n_t_e_r_v_a_l] [----llll _p_r_e_l_o_a_d] [----pppp _p_a_t_t_e_r_n] [----TTTT _t_t_l]
  14.           [----tttt _t_o_s] [----wwww _m_a_x_w_a_i_t]
  15.           [----IIII _i_f_a_d_d_r] [----gggg _g_a_t_e_w_a_y] [----hhhh _h_o_s_t] _h_o_s_t
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      _P_i_n_g is a tool for network testing, measurement and management.  It
  19.      utilizes the ICMP protocol's ECHO_REQUEST datagram to elicit an ICMP
  20.      ECHO_RESPONSE from a host or gateway.  ECHO_REQUEST datagrams (``pings'')
  21.      have an IP and ICMP header, followed by an 8-byte timestamp, and then an
  22.      arbitrary number of ``pad'' bytes used to fill out the packet.
  23.  
  24.      The _h_o_s_t can be the name of a host or its Internet address.  The options
  25.      are:
  26.  
  27.      ----cccc _c_o_u_n_t
  28.           Stop after sending (and waiting the specified delay to receive)
  29.           _c_o_u_n_t ECHO_RESPONSE packets.
  30.  
  31.      ----dddd   Set the SO_DEBUG option on the socket being used.
  32.  
  33.      ----DDDD   Set the _D_o_n'_t _F_r_a_g_m_e_n_t bit in the IP header.  This can be used to
  34.           determine the path MTU.
  35.  
  36.      ----ffff   Flood ping.  Send ECHO_REQUEST packets as fast as they are answered
  37.           with ECHO_RESPONSE packets or one hundred times per second,
  38.           whichever is more.  (The repetition rate can be adjusted with the ----iiii
  39.           option.)  For every ECHO_REQUEST sent a period (.) is printed, while
  40.           for every ECHO_REPLY received a backspace is printed.  This provides
  41.           a rapid display of how many packets are being dropped.  _T_h_i_s _c_a_n _b_e
  42.           _e_x_t_r_e_m_e_l_y _s_t_r_e_s_s_f_u_l _o_n _a _n_e_t_w_o_r_k _a_n_d _s_h_o_u_l_d _b_e _u_s_e_d _w_i_t_h _c_a_u_t_i_o_n.
  43.  
  44.      ----gggg _g_a_t_e_w_a_y
  45.           Use Loose Source Routing to send the ECHO_REQUEST packets via
  46.           _g_a_t_e_w_a_y.
  47.  
  48.      ----hhhh _h_o_s_t
  49.           is an alternate way of specifying the target host instead of as the
  50.           last argument.
  51.  
  52.      ----iiii _i_n_t_e_r_v_a_l
  53.           Wait _i_n_t_e_r_v_a_l seconds between sending each packet.  The default is
  54.           to wait for one second between each packet, except when the -f
  55.           option is used when the default is "0.01" second or 10 milliseconds.
  56.  
  57.      ----IIII _i_n_t_e_r_f_a_c_e
  58.           Send multicast datagrams via the network interface specified by the
  59.           interface's hostname or IP address.  Send non-multicast datagrams
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. PPPPIIIINNNNGGGG((((1111MMMM))))                                                              PPPPIIIINNNNGGGG((((1111MMMM))))
  71.  
  72.  
  73.  
  74.           with the specified source address.
  75.  
  76.      ----llll _c_o_u_n_t
  77.           Preload the network by sending _c_o_u_n_t packets as fast as possible
  78.           before falling into the normal mode of behavior.
  79.  
  80.      ----LLLL   When sending to a multicast destination address, don't loop the
  81.           datagram back to ourselves.
  82.  
  83.      ----nnnn   Numeric output only.  No attempt will be made to look up symbolic
  84.           names for host addresses.  This is useful to avoid waiting to
  85.           convert the addresses of distant hosts to names.
  86.  
  87.      ----oooo   Exit successfully after receiving one reply packet.
  88.  
  89.      ----pppp _p_a_t_t_e_r_n
  90.           You may specify up to 16 ``pad'' bytes to fill out the packet you
  91.           send.  This is useful for diagnosing data-dependent problems in a
  92.           network.  For example, ``-p ff'' will cause the sent packet to be
  93.           filled with all ones.
  94.  
  95.      ----PPPP   Use a psuedo-random sequence for the data instead of the default,
  96.           fixed sequence of incrementing 8-bit integers.  This is useful to
  97.           foil compression on PPP and other links.
  98.  
  99.      ----qqqq   Quiet output.  Nothing is displayed except the summary line on
  100.           termination.
  101.  
  102.      ----QQQQ   Do not display responses such as Network Unreachable ICMP messages
  103.           concerning the ECHO_REQUESTs sent.
  104.  
  105.      ----rrrr   Bypass the normal routing tables and send directly to a host on an
  106.           attached network.  If the host is not on a directly-attached
  107.           network, an error is returned.  This option can be used to ping a
  108.           local host through an interface that has no route through it (e.g.,
  109.           after the interface was dropped by _r_o_u_t_e_d(1M)).
  110.  
  111.      ----RRRR   Record Route.  Includes the RECORD_ROUTE option in the ECHO_REQUEST
  112.           packet and displays the route buffer on returned packets.  Note that
  113.           the IP header is only large enough for eight such routes, and only
  114.           six when using the ----gggg option.  Many hosts ignore or discard this
  115.           option.
  116.  
  117.      ----ssss _s_i_z_e
  118.           Send datagrams containing _s_i_z_e bytes of data.  The default is 56,
  119.           which translates into 64 ICMP data bytes when combined with the 8
  120.           bytes of ICMP header data.  The maximum allowed value is 61396.
  121.  
  122.      ----tttt _t_o_s
  123.           Use the specified hexadecimal type of service.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. PPPPIIIINNNNGGGG((((1111MMMM))))                                                              PPPPIIIINNNNGGGG((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      ----TTTT _t_t_l
  141.           Changes the default time-to-live.
  142.  
  143.      ----vvvv   Verbosely list ICMP packets other than ECHO_RESPONSE that are
  144.           received by the system.  By default, only ICMP packets (including
  145.           ECHO_RESPONSEs) concerning the ECHO_REQUEST packets sent by _p_i_n_g are
  146.           listed.  When verbosity is turned on, almost all ICMP packets are
  147.           listed, including error messages concerning other network traffic.
  148.  
  149.      ----wwww _m_a_x_w_a_i_t
  150.           Specifies the number of seconds to wait for a response to a packet
  151.           before transmitting the next one.  The default is 10.0.
  152.  
  153.      _P_i_n_g should be used primarily for manual fault isolation.  Because of the
  154.      load it can impose on the network, it is unwise to use _p_i_n_g during normal
  155.      operations or from automated scripts.  When using _p_i_n_g for fault
  156.      isolation, it should first be run on the local host, to verify that the
  157.      local network interface is up and running.  Then, hosts and gateways
  158.      further and further away should be ``pinged''.
  159.  
  160.      _P_i_n_g repeated sends individual datagrams (by default one per second), and
  161.      prints one line of output for every ECHO_RESPONSE returned.
  162.  
  163.      On a trusted system with IP Security Options enabled, if the network
  164.      idiom is not MONO, _p_i_n_g also prints a second line containing the
  165.      hexadecimal representation of the IP security option in the
  166.      ECHO_RESPONSE.
  167.  
  168.      If the ----cccc _c_o_u_n_t option is given, only that number of requests is sent.
  169.      If there is no response, then  no output other than the final summary is
  170.      produced Round-trip times and packet loss statistics are computed.  If
  171.      duplicate packets are received, they are not included in the packet loss
  172.      calculation, although the round trip time of these packets is used in
  173.      calculating the minimum/average/maximum round-trip time numbers.  When
  174.      the specified number of packets have been sent (and received) or if the
  175.      program is terminated with an interrupt (SIGINT), a brief summary is
  176.      displayed.  When not using the ----ffff (flood) option, the first interrupt,
  177.      usually generated by control-C or DEL, causes _p_i_n_g to wait for its
  178.      outstanding requests to return.  It will wait no longer than the longest
  179.      round trip time encountered by previous, successful pings.  The second
  180.      interrupt stops _p_i_n_g immediately.
  181.  
  182. DDDDEEEETTTTAAAAIIIILLLLSSSS
  183.      An IP header without options is 20 bytes.  An ICMP ECHO_REQUEST packet
  184.      contains an additional 8 bytes worth of ICMP header followed by an
  185.      arbitrary amount of data.  When a _p_a_c_k_e_t_s_i_z_e is given, it indicates the
  186.      size of this extra piece of data (the default is 56).  Thus the amount of
  187.      data received inside of an IP packet of type ICMP ECHO_REPLY will always
  188.      be 8 bytes more than the requested data space (the ICMP header).
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. PPPPIIIINNNNGGGG((((1111MMMM))))                                                              PPPPIIIINNNNGGGG((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      If the data space is at least eight bytes large, _p_i_n_g uses the first
  207.      eight bytes of this space to include a timestamp to compute round trip
  208.      times.  If less than eight bytes of pad are specified, no round trip
  209.      times are given.
  210.  
  211. DDDDUUUUPPPPLLLLIIIICCCCAAAATTTTEEEE AAAANNNNDDDD DDDDAAAAMMMMAAAAGGGGEEEEDDDD PPPPAAAACCCCKKKKEEEETTTTSSSS
  212.      _P_i_n_g will report duplicate and damaged packets.  Duplicate packets should
  213.      never occur, and seem to be caused by inappropriate link-level
  214.      retransmissions.  Duplicates may occur in many situations and are rarely
  215.      (if ever) a good sign, although the presence of low levels of duplicates
  216.      may not always be cause for alarm.
  217.  
  218.      Damaged packets are obviously serious cause for alarm and often indicate
  219.      broken hardware somewhere in the _p_i_n_g packet's path (in the network or in
  220.      the hosts).
  221.  
  222. TTTTRRRRYYYYIIIINNNNGGGG DDDDIIIIFFFFFFFFEEEERRRREEEENNNNTTTT DDDDAAAATTTTAAAA PPPPAAAATTTTTTTTEEEERRRRNNNNSSSS
  223.      The (inter)network layer should never treat packets differently depending
  224.      on the data contained in the data portion.  Unfortunately, data-dependent
  225.      problems have been known to sneak into networks and remain undetected for
  226.      long periods of time.  In many cases the particular pattern that will
  227.      have problems is something that doesn't have sufficient ``transitions'',
  228.      such as all ones or all zeros, or a pattern right at the edge, such as
  229.      almost all zeros.  It isn't necessarily enough to specify a data pattern
  230.      of all zeros (for example) on the command line because the pattern that
  231.      is of interest is at the data link level, and the relationship between
  232.      what you type and what the controllers transmit can be complicated.
  233.  
  234.      This means that if you have a data-dependent problem you will probably
  235.      have to do a lot of testing to find it.  If you are lucky, you may manage
  236.      to find a file that either can't be sent across your network or that
  237.      takes much longer to transfer than other similar length files.  You can
  238.      then examine this file for repeated patterns that you can test using the
  239.      ----pppp option of _p_i_n_g.
  240.  
  241. TTTTTTTTLLLL DDDDEEEETTTTAAAAIIIILLLLSSSS
  242.      The TTL value of an IP packet represents the maximum number of IP routers
  243.      that the packet can go through before being thrown away.  In current
  244.      practice you can expect each router in the Internet to decrement the TTL
  245.      field by exactly one.
  246.  
  247.      The maximum possible value of this field is 255, and most Unix systems
  248.      set the TTL field of ICMP ECHO_REQUEST packets to 255.
  249.  
  250.      In normal operation ping prints the ttl value from the packet it
  251.      receives.  When a remote system receives a ping packet, it can do one of
  252.      three things with the TTL field in its response:
  253.  
  254.      +o Not change it; this is what Berkeley Unix systems did before the
  255.        4.3BSD-tahoe release.  In this case the TTL value in the received
  256.        packet will be 255 minus the number of routers in the round-trip path.
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. PPPPIIIINNNNGGGG((((1111MMMM))))                                                              PPPPIIIINNNNGGGG((((1111MMMM))))
  269.  
  270.  
  271.  
  272.      +o Set it to 255; this is what IRIX and current Berkeley Unix systems do.
  273.        In this case the TTL value in the received packet will be 255 minus the
  274.        number of routers in the path _f_r_o_m the remote system _t_o the _p_i_n_ging
  275.        host.
  276.  
  277.      +o Set it to some other value.  Some machines use the same value for ICMP
  278.        packets that they use for TCP packets, for example either 30 or 60.
  279.        Others may use completely wild values.
  280.  
  281. EEEEXXXXIIIITTTT SSSSTTTTAAAATTTTUUUUSSSS
  282.      _P_i_n_g returns 0 on success (the host is alive), and non-zero if the
  283.      arguments are incorrect or the host is not responding.
  284.  
  285. BBBBUUUUGGGGSSSS
  286.      Many Hosts and Gateways ignore the RECORD_ROUTE option.
  287.  
  288.      The maximum IP header length is too small for options like RECORD_ROUTE
  289.      to be completely useful.  There's not much that can be done about this,
  290.      however.
  291.  
  292.      On a trusted system with IP Security Options enabled the IP header will
  293.      not be able to accommodate both the security option and the RECORD_ROUTE
  294.      option.  Other IP options may not be supported if the security option is
  295.      significantly large and in these situations the use of these options will
  296.      be refused.
  297.  
  298.      Flood pinging is not recommended in general, and flood pinging the
  299.      broadcast address should only be done under very controlled conditions.
  300.  
  301.      The record-route option does not work with many hosts and routers.
  302.  
  303. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  304.      netstat(1), ifconfig(1M), routed(1M)
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.